package PTA.javabianchengjichu2;

import java.util.Scanner;

public class ex22 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
        System.out.println(a%10+a%100/10+a/100);


    }
}
